<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>原型链测试</title>
		<script>
			
			var Person=function(){
				this.Name="春雷";
				this.Age=25;
				this.GetScore=function(){
					return this.Name+":"+"100,200,300";
				}
			}
			Person.prototype.getAddress=function(){
				return this.Name+":淮北";
			}
			console.log(Person.prototype);
			var person=new Person();
			console.log(person.prototype);
			console.log(Person.prototype==person.__proto__);
			console.log(Person.prototype.__proto__==Object.prototype);
			console.log(Function.prototype.__proto__);
			console.log(Person.prototype.constructor==Person);
			debugger;
			
			var animal = function(){};
			var dog = function(){};
			 
			animal.price = 2000;//
			dog.prototype = animal;
			var tidy = new dog();
			 
			 
			console.log(dog. price)  //undefined
			console.log(tidy.price)  // 2000
		</script>
	</head>

	<body>
	</body>

</html>